import { MockMethod } from 'vite-plugin-mock';
import { resultSuccess } from '../_util';
import { mock } from 'mockjs';

const accountList = mock({
  'data|30': [
    {
      id: '@increment',
      memberId: '@increment',
      num: '10',
      changeType: 1,
      changeTypeText: '后台调整',
      remainNum: 10,
      desc: '就反抗类毒素解放',
      createTime: '@date(yyyy-MM-dd HH:mm:ss)',
    },
  ],
});

export default [
  //分页
  {
    url: '/mock-api/v1/member/account/page',
    timeout: 100,
    method: 'post',
    response: () => {
      return resultSuccess({ list: accountList.data.slice(0, 6), total: 10 });
    },
  },
] as MockMethod[];
